package com.es;


import com.es.controller.StudentController;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;

@Configuration
@ComponentScan
public class DiApp {
    public static void main(String[] args) {
        //加载配置类，初始化spring容器
        AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext(DiApp.class);
        StudentController controller = ctx.getBean(StudentController.class);
        controller.save();
        ctx.close();
    }
}
